class Segment extends Object {
	private Point dest = null; 
	private Point orig = null; 
	private Segment sig = null;
	private Segment twin = null;
	private Segment prev = null;
	
	public Segment(Point v, Segment n, Segment t) {
		this.dest = v;
		this.sig = n;
		this.twin = t;
		v.addEdge(this);
	}

	public Segment(Segment e) {
		this.dest = e.dest;
		this.sig = e.sig;
		this.twin = e.twin;
		this.orig = e.orig;
		this.prev = e.prev;
	}

	public void setDest(Point v) {
		this.dest = v;
	}

	public void setSig(Segment e) {
		this.sig = e;
	}

	public void setTwin(Segment e) {
		this.twin = e;
		e.twin = this;
	}

	public Segment getSig() {
		return this.sig;
	}

	public Segment getTwin() {
		return this.twin;
	}

	public Point getDest() {
		return this.dest;
	}

	public String toString() {
		return "<" + getOrig() + "," + getDest() + ">";
	}

	public Segment(Point v, Point w) {
		this.orig = v;
		this.dest = w;
	}

	public void setOrig(Point v) {
		this.orig = v;
	}

	public Point getOrig() {
		return this.orig;
	}

	public void setPrev(Segment e) {
		this.prev = e;
	}

	public Segment getPrev() {
		return this.prev;
	}

	public boolean igualQue(Segment a) {
		return (this.getOrig().equals(a.getOrig()) && this.getDest()
				.equals(a.getDest()));
	}

}
